<?php

namespace app\zmt\validate;

use think\Validate;

class UserValidate extends Validate
{
    protected $rule = [
        'mboile'     => 'require',
        'image'     => 'require',
        'name'     => 'require',
    ];

    protected $message = [
        'mboile.require'     => '手机号不能为空',
        'image.require'     => '图片不能为空',
        'name.require'     => '用户名不能为空',
    ];
    protected $scene = [
        'addpost' => ['mobile', 'image', 'name'],
        'editpost' => ['mobile' => 'require|length:11', 'image', 'name'],
    ];
}
